from django.urls import path

from Apps.user.views.views import LoginView, userView, LogoutView, UserInfoView, getUserByCodeView, CheckUserLogin, \
    SaveAvatar, getIndexWeatherInfo, getIndexUserInfo, getDayNote

from rest_framework.routers import SimpleRouter

route = SimpleRouter()
route.register('user', userView, basename='user')
urlpatterns = [
                  path('login/', LoginView.as_view()),
                  path('getInfo/', UserInfoView.as_view()),
                  path('getUserbycode/', getUserByCodeView.as_view()),
                  path('checkUser/', CheckUserLogin.as_view()),
                  path('logout/', LogoutView.as_view()),
                  path('saveAvatar/', SaveAvatar.as_view()),
                  path('getIndexWeatherInfo/', getIndexWeatherInfo.as_view()),
                  path('getDayNote/', getDayNote.as_view()),
                  path('getIndexUserInfo/', getIndexUserInfo.as_view()),
              ] + route.urls
